﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HotelManagement._04.OBJECT;
using HotelManagement._03.DAO;

namespace HotelManagement._02.BUS
{
    class CheckInBUS
    {
        CheckInDAO m_CheckInDAO = new CheckInDAO();

        public DataTable ViewRoomStatus()
        {
            return m_CheckInDAO.ViewDataProcedure("pr_tblRoom_SelectRoomEmpty");
        }

        public DataTable ViewReservation(DateTime ip_datetimeNow)
        {
            return m_CheckInDAO.ViewReservation(ip_datetimeNow, "pr_tblReservation_SelectForCheckIn");
        }

        public DataTable SelectRoomID()
        {
            return m_CheckInDAO.ViewDataProcedure("pr_tblRoom_SelectRoomID");
        }

        public DataTable ViewInfoCustomer(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.ViewInfoCustomer(ip_checkIn, "pr_tblCustomer_SelectRow");
        }

        public DataTable ViewInfoRoomType(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.ViewInfoRoomType(ip_checkIn, "pr_tblRoomType_SelectRowByRoomID");
        }

        public bool CheckInInsert(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.CheckInInsert(ip_checkIn, "pr_tblCheckIn_Insert");
        }

        public bool CheckInRoomUpdateStatus(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.CheckInRoomUpdateStatus(ip_checkIn, "pr_tblRoom_UpdateForCheckIN");
        }

        public bool CheckInReservationUpdateNote(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.CheckInReservationUpdateNote(ip_checkIn, "pr_tblReservation_UpdateForCheckIN");
        }

        public DataTable SearchCustomer(string ip_CustomerName)
        {
            return m_CheckInDAO.SearchCustomer(ip_CustomerName, "pr_tblCustomer_SearchCustomerByName");
        }

        public DataTable ViewCustomerInfo(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.ViewCustomerInfo(ip_checkIn, "pr_tblCustomer_SearchCustomerByCustomerID");
        }

        public DataTable GetReservationByRoomID(string ip_RoomID,DateTime ip_DatetimeNow)
        {
            return m_CheckInDAO.GetReservationByRoomID(ip_RoomID,ip_DatetimeNow, "pr_tblReservation_GetReservationByRoomID");
        }

        public DataTable GetRoomTypeByRoomID(string ip_RoomID)
        {
            return m_CheckInDAO.GetRoomTypeByRoomID(ip_RoomID, "pr_tblRoomType_SelectCostByRoomID");
           
        }

        public bool CheckInRoomUpdateStatus1(CheckIn ip_checkIn)
        {
            return m_CheckInDAO.CheckInRoomUpdateStatus1(ip_checkIn, "pr_tblRoom_UpdateForCheckIN");
        }
    }
}
